<?php
/**
 * Created by PhpStorm.
 * Script Name: Test.php
 * Create: 2023/1/9 11:36
 * Description:
 * Author: fudaoji<fdj@kuryun.cn>
 */

namespace plugin\wechat\app\platform\handler\mp;

class TextMessageHandler extends MessageHandler
{
    /**
     * 初始化
     * @author fudaoji<fdj@kuryun.cn>
     */
    public function __construct() {
        parent::__construct();
    }

    /**
     * 处理器
     * @param null $payload
     * @return mixed
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
     * @author fudaoji<fdj@kuryun.cn>
     */
    public function handle($payload = null) {
        parent::handle($payload);
        $res = $this->replyKeyword($payload['Content'], $payload);
        if($res){
            return $res;
        }
    }
}